<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>贪吃蛇游戏</title>
  <style>
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
      background-color: #f0f0f0;
    }
    #game {
      position: relative;
      width: 400px;
      height: 400px;
      background-color: #fff;
      border: 2px solid #333;
    }
    .snake, .food {
      position: absolute;
      width: 20px;
      height: 20px;
    }
    .snake {
      background-color: green;
    }
    .food {
      background-color: red;
    }
  </style>
</head>
<body>
  <div id="game"></div>
  <script src="game.js"></script>
</body>
</html>